//
//  ViewController.m
//  Practice--Album
//
//  Created by 冀永金 on 16/7/20.
//  Copyright © 2016年 冀永金. All rights reserved.
//

#import "ViewController.h"
#import "Album.h"

@interface ViewController ()
@property (nonatomic, strong) NSMutableArray *marr;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self createAlbum];
    // Do any additional setup after loading the view, typically from a nib.
}

- (NSArray *)images {
    self.marr = [NSMutableArray array];
    for (int i = 1; i < 12; i++) {
        NSString *name = [NSString stringWithFormat:@"123_%d.jpg",i];
        UIImage *image = [UIImage imageNamed:name];
        [_marr addObject:image];
       }
    return _marr;
    
}
- (void)createAlbum {
    NSArray *images = [self images];
    Album *ab = [[Album alloc]initWithFrame:CGRectMake(0, 200, self.view.frame.size.width, self.view.frame.size.height) images:images];
    [self.view addSubview:ab];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
